//此文件是用来获取home页面所有数据的管理文件

//1.引入定义方式
import { defineStore } from 'pinia'
import type { ReportDataModel } from '@/api/mock/model/data'
import { reqGetReportData } from '@/api/mock'
//2.定义store
export const useReportDataStore = defineStore({
  id: 'reportData',
  state() {
    return {
      reportData: {} as ReportDataModel
    }
  },
  actions: {
    async getReportData() {
      const result = await reqGetReportData()
      // console.log('mock',result)
      this.reportData = result
    }
  }
})